﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data.SqlTypes;


namespace Design
{
    public partial class Report : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection("Data Source=DS3-PC17;Initial Catalog=VIDEOS_FACTORY;User ID=sa,Password=Server01");
            Booking ds = new Booking();
            SqlDataAdapter adapter = new SqlDataAdapter("SELECT     dbo.BOOKING.BOOKNG_NUMBER, dbo.BOOKING.PAYMENT_METHOD, dbo.BOOKING.TOTAL_AMONUT, dbo.BOOKING.BOOKING_DATE, dbo.BOOKING.RETURN_DATE, dbo.BOOKING.BOOKING_DESCRIPTION, dbo.BOOKING.STATUS, dbo.BOOKING.QUANTITY, dbo.CART.carts_id, dbo.CART.quantity AS Expr1, dbo.CART.price, dbo.CART.product_NAME, dbo.CART.image_name, dbo.CART.total FROM dbo.BOOKING CROSS JOIN dbo.CART",con);
            adapter.Fill(ds.Booking_Cart);
            CrystalReport1 report = new CrystalReport1();
            report.SetDataSource(ds);
            CrystalReportViewer1.ReportSource = report;
        }
    }
}